﻿@{
    ViewBag.Title = "Výsledky";
}

<h2>Výsledky: @ViewBag.Competitions.Name</h2>

<p>
    @Html.Raw(ViewBag.MyHtmlContent)
</p>

<!-- Cookies -->
<script type="text/javascript">
    var pos = document.cookie.indexOf("OPEN=");
    var i;
    var pocet = 65;
    var retazec = 'N';

    if (pos == -1) {
        var retazec = 'N';
        for (i = 1; i < pocet; i++) {
            retazec = retazec + 'N';
        }
        document.cookie = "OPEN=" + escape(retazec);
        document.write("<style>.skryvany{display:none;}</style>");
    }
    else {
        var f;
        for (i = 1; i < pocet; i++) {
            f = document.cookie.substring(pos + i + 4, pos + i + 5);
            if (f == 'N') {
                document.write("<style>#oddiel" + (i) + "{display:none;}</style>");
            }
            else {
                document.write("<style>#oddiel" + (i) + "{display:block;}</style>");
            }
        }
    }
</script>

<!-- Shows/hides div -->
<script type="text/javascript">
    function zobrazSkryj(idecko) {
        var pocet = 65;
        var x = "oddiel" + idecko;
        el = document.getElementById(x).style;

        if (el.display == "block") {
            el.display = "none";
            var pos = document.cookie.indexOf("OPEN=");
            var f = document.cookie.substring(pos + 5, pos + 5 + pocet);
            var z = f.substring(0, idecko - 1);
            var k = f.substring(idecko, pocet);
            document.cookie = "OPEN=" + escape(z + 'N' + k);
        }
        else {
            el.display = "block";
            var pos = document.cookie.indexOf("OPEN=");
            var f = document.cookie.substring(pos + 5, pos + 5 + pocet);
            var z = f.substring(0, idecko - 1);
            var k = f.substring(idecko, pocet);
            document.cookie = "OPEN=" + escape(z + 'A' + k);
        }
    }
</script>
